import request from '@/utils/request'

// 查询电子书列表列表
export function listFiction(query) {
  return request({
    url: '/book/fiction/list',
    method: 'get',
    params: query
  })
}

// 查询电子书列表详细
export function getFiction(id) {
  return request({
    url: '/book/fiction/' + id,
    method: 'get'
  })
}

// 新增电子书列表
export function addFiction(data) {
  return request({
    url: '/book/fiction',
    method: 'post',
    data: data
  })
}

// 修改电子书列表
export function updateFiction(data) {
  return request({
    url: '/book/fiction',
    method: 'put',
    data: data
  })
}

// 删除电子书列表
export function delFiction(id) {
  return request({
    url: '/book/fiction/' + id,
    method: 'delete'
  })
}

// 爬取电子书列表
export function crawlingBook() {
  return request({
    url: '/book/fiction/crawlingBook',
    method: 'GET'
  })
}
